home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / C / Applications / SML⁄NJ 93+ / Documentation / release-notes / release-notes.txt < prev   
Encoding:
Text File  |  1995-12-30  |  33.9 KB  |  1,125 lines  |  [TEXT/R*ch]

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.                      Standard ML of New Jersey
  19.                                 ---
  20.                            Release Notes
  21.  
  22.                            (Version 0.93)
  23.  
  24.                          February 15, 1993
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44. Copyright Oc 1989, 1990, 1991, 1992, 1993 by AT&T Bell Laboratories
  45.  
  46.  
  47.  
  48.  
  49.                      License and Disclaimer
  50.  
  51.  
  52.      Copyright cO 1989, 1990, 1991, 1992, 1993 by AT&T Bell
  53.                           Laboratories
  54.                       All Rights Reserved
  55.  
  56.  
  57.  
  58.  
  59. Permission to use, copy, modify, and distribute this software
  60. and its documentation for any purpose and without fee is
  61. hereby granted, provided that the above copyright notice
  62. appear in all copies and that both the copyright notice and
  63. this permission notice and warranty disclaimer appear in
  64. supporting documentation, and that the name of AT&T Bell
  65. Laboratories or any AT&T entity not be used in advertising or
  66. publicity pertaining to distribution of the software without
  67. specific, written prior permission.
  68. AT&T disclaims all warranties with regard to this software,
  69. including all implied warranties of merchantability and
  70. fitness.  In no event shall AT&T be liable for any special,
  71. indirect or consequential damages or any damages whatsoever
  72. resulting from loss of use, data or profits, whether in an
  73. action of contract, negligence or other tortious action,
  74. arising out of or in connection with the use or performance of
  75. this software.
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.                                i
  99.  
  100.  
  101.  
  102.  
  103.                        Standard ML of New Jersey
  104.                               Version 0.93
  105.  
  106.                       Andrew Appel  David MacQueen
  107.                        Lal George     John Reppy
  108.  
  109. 1  Introduction
  110.  
  111. This document describes the latest release of the Standard ML of New
  112. Jersey (SML/NJ) system.
  113. We are eager to receive your bug reports, comments, and constructive
  114. criticism.  Any error message beginning with ``Compiler bug''
  115. definitely indicates a bug in the compiler and should be reported.
  116. Please use an appropriate variation on the bug reporting form in the
  117. file doc/bugs/bug.form and send comments and bug reports to
  118. macqueen@research.att.com.
  119.  
  120. 1.1  Acknowledgements
  121.  
  122.     William Aitken rewrote the pattern-match compiler.
  123. Bruce F. Duba helped improve the pattern-match compiler, the CPS
  124. constant-folding phase, the in-line expansion phase, the spill phase,
  125. and numerous other parts of the compiler.  He also helped to design
  126. the call with current continuation mechanism.
  127.  
  128. Adam T. Dingle implemented the Emacs mode for the debugger.
  129. Doug Currie and Soren Christiansen ported the system to Macintosh.
  130.  
  131. Pierre Cregut wrote the fifth-generation module system (introducing
  132. higher-order functors) and the sixth-generation module system.
  133. Damien Doligez began the implementation of the fourth-generation
  134. module system.
  135. Scott Draves did most of the HP Precision port.
  136.  
  137. Emden Gansner co-wrote the eXene window system (with John Reppy),
  138. worked on a separate compilation system, and contributed to and helped
  139. organized the software library.
  140. Georges Gonthier devised new algorithms for the fourth-generation
  141. module system.
  142.  
  143. Yngvi Guttesen wrote the code generator and runtime system for the
  144. Intel 386 under MS-Windows.
  145. Ivan Hajadi wrote the original Macintosh port.
  146. Trevor Jim helped design the CPS representation, and implemented the
  147. match compiler and the closure-conversion phase, the original library
  148. of floating-point functions, and the original assembly-language
  149. implementation of external primitive functions.
  150.  
  151.  
  152.                                    1
  153.  
  154.  
  155.  
  156.  
  157. Mark Leone rewrote Guttesen's i386 code generator and ported it to
  158. Unix for the PC.
  159. Mark Lillibridge rewrote the type checker.
  160. James S. Mattson implemented the first version of the lexical-analyzer
  161. generator used in constructing the compiler.
  162.  
  163. Greg Morrisett did the first multiprocessor implementation of SML/NJ,
  164. and wrote a key part of the fourth-generation module system.
  165. James W. O'Toole implemented the NS32032 code generator.
  166.  
  167. Norman Ramsey implemented the first version of the MIPS code
  168. generator.
  169. Gene Rollins developed the SourceGroup compilation system.
  170. Nick Rothwell helped implement the separate compilation mechanism.
  171.  
  172. Zhong Shao implemented common-subexpression elimination, as well as
  173. the callee-save convention that uses multiple-register continuations
  174. for faster procedure calls.  He has also fixed many bugs.
  175. Konrad Slind helped design and implemented the quote-antiquote
  176. facility and the pretty-printer.
  177.  
  178. David R. Tarditi improved the lexical-analyzer generator and
  179. implemented the parser generator used to build parts of the front end;
  180. he helped in implementing the type-reconstruction algorithm used by
  181. the debugger; he implemented the ML-to-C translator with Anurag
  182. Acharya and Peter Lee, and wrote most of the fourth-generation module
  183. system.
  184. Mads Tofte helped implement the separate compilation mechanism and
  185. helped develop higher order modules.
  186.  
  187. Andrew P. Tolmach implemented the SML/NJ debugger.  He also rewrote
  188. static environments (symbol tables) in a more functional style.
  189. Peter Weinberger implemented the first version of the copying garbage
  190. collector.
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.                                    2
  207.  
  208.  
  209.  
  210.  
  211. 2  What's New in 0.93
  212. Much has changed since version 0.75, though most old programs should
  213. still be compatible.  This is a very brief summary of important
  214. changes; for more details see the file doc/bugs/NEWS in the
  215. distribution.
  216.  
  217.  
  218. New machines supported
  219.  
  220. SML/NJ now runs on the Intel 386 architecture (with Unix), the IBM
  221. PowerSystem (RS 6000), and the Hewlett-Packard Precision Architecture.
  222. As before, it runs on the Sparc, MIPS (DECstation, SGI, etc.), and
  223. Motorola 680x0 (Sun3, NeXT, Macintosh, etc.).  See section 3.3.1 for
  224. more details.
  225. SML/NJ 0.93 does not run under MS-DOS or Microsoft Windows, but we
  226. plan to port it to Windows NT.
  227.  
  228.  
  229. Separate compilation
  230.  
  231. The import keyword is gone.  Separate compilation is now supported by
  232. the SourceGroup system, which is located in tools/sourcegroup.
  233.  
  234.  
  235. Higher-order functors
  236.  
  237. Functors can now take other functors as arguments, and return functors
  238. as results.  For details, see the User Guide (the first chapter of the
  239. SML/NJ Reference Manual).
  240.  
  241.  
  242. Bug fixes
  243.  
  244. Many bugs have been fixed.  Others have been introduced, and most of
  245. these have been fixed too.  For details, see doc/bugs/masterbugs for a
  246. complete history and doc/bugs/openbugs for a summary of the bugs that
  247. remain to be fixed.
  248.  
  249.  
  250. Base environment documentation
  251.  
  252. The SML/NJ reference manual contains descriptions of the structures
  253. and bindings built into the sml executable (the SML/NJ base
  254. (pervasive) environment).  A summary of the base environment is listed
  255. in Table 1.
  256.  
  257.  
  258.  
  259.  
  260.                                    3
  261.  
  262.  
  263.  
  264.  
  265.  
  266.    Array            updateable constant-time indexable sequences
  267.    Bits             bitwise logical operations on integers
  268.    Bool             Boolean type and operations upon it
  269.    ByteArray        compact arrays of bytes
  270.    callcc, throw    call with current continuation
  271.  
  272.    General          general-purpose predeclared identifiers
  273.    Integer          fixed-precision integers and operations upon them
  274.    IO               Input/Output structure
  275.    List             operations on lists
  276.    Quote/Antiquote  object language embedding
  277.  
  278.    Real             floating-point numbers and operations thereupon
  279.    RealArray        compact arrays of real numbers
  280.    Ref              operations on references
  281.    String           operations on character strings
  282.  
  283.    Vector           immutable, constant-time indexable sequences
  284.                  Table 1:  The SML/NJ base environment
  285.  
  286.  
  287. Documentation for the System structure, which provides the interface
  288. to the compiler and operating system, is also available in the
  289. reference manual, and is summarized in Table 2.
  290.  
  291.  
  292. Program Library
  293.  
  294. A library documented with manual pages is also provided.  A summary of
  295. the library is listed in Table 3 These modules are not pre-loaded into
  296. the sml executable, but must be loaded by use or through SourceGroup.
  297.  
  298.  
  299. Debugger
  300.  
  301. The SML debugger can be used with this release.  See
  302. /tool/debug/debug.ps for information.
  303.  
  304.  
  305. Vectors
  306.  
  307. Patterns and expressions have been extended to include vector patterns
  308. and expressions.  #[pat1,..patn] represents a vector pattern assuming
  309. pat1,..patn are patterns, and #[exp1,..expn] represents an vector
  310. expression assuming exp1,..expn are expressions.
  311.  
  312.  
  313.  
  314.                                    4
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328. Ast           externalized abstract syntax trees used in the compiler
  329.  
  330. Symbol        support for symbols used in ASTs
  331. Env           manipulation of environments as first class objects
  332. Code          utilities over code strings
  333. Compile       various phases of the compiler
  334.  
  335. PrettyPrint   prettyprinting utilities
  336. Print         control of output produced by the compiler
  337. Control       various optimization and runtime flags
  338. Tags          tags used for runtime objects
  339. Timer         interface to operating system timer
  340.  
  341. Stats         record of internal compiler statistics
  342. Unsafe        various unsafe primitives
  343. Signals       interface to UNIX signals
  344. Directory     interface to UNIX files and directories
  345.  
  346. exn_name      function returning a string for an exeception
  347. version       string containing the version number
  348. architecture  name of the architecture
  349. runtimeStamp  stamp associated with the runtime system
  350. interactive   boolean that is true in an interactive session
  351. system        to execute a command shell
  352. argv          string list of arguments supplied to sml
  353.  
  354. environ       string list containing the user UNIX environment
  355.  
  356.                 Table 2:  The SML/NJ System structure
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.                                   5
  369.  
  370.  
  371.  
  372.  
  373.  
  374. ArrayQSort     in-place sorting of arrays
  375. Array2         two-dimensional arrays.
  376. ARRAY_SORT     signature for in-place sorting of arrays
  377. BinaryDict     binary tree dictionary functor
  378. BinarySet      binary tree set functor
  379.  
  380. CharSet        sets of characters
  381. CType          character classification and conversion functions
  382. DICT           signature for applicative dictionaries
  383. DynamicArray   dynamic array functor
  384. Fifo           applicative queue
  385.  
  386. Finalizer      object finalization functor
  387. Format         create formatted strings
  388. HashString     computing hash keys on strings
  389. HashTable      hash table functor
  390. IntMap         applicative integer map
  391. IntSet         applicative integer set
  392.  
  393. Iterate        general purpose iteration
  394. LibBase        base definitions for the SML/NJ library.
  395. ListFormat     formatting and scanning of lists
  396. ListMergeSort  applicative list sorting using merge sort
  397.  
  398. ListUtil       list utility functions
  399. LIST_SORT      generic interface for list sorting modules.
  400. Makestring     convert primitive types to their string representation.
  401. Name           unique strings
  402. ORD_KEY        signature for ordered keys
  403.  
  404. ORD_SET        signature for applicative sets on ordered types
  405. Pathname       support for pathname decomposition and search path lists.
  406. PolyHashTable  polymorphic hash tables
  407. Queue          imperative queue
  408.  
  409. Random         simple random number generator
  410. SplayDict      splay tree dictionary functor
  411. SplaySet       splay tree set functor
  412. SplayTree      splay tree data structure
  413. StringCvt      convert strings into primitive values.
  414.  
  415. StringUtil     string operations
  416. TimeLimit      limit the amount of time spent evaluating a function application.
  417. UnixEnv        manage name-value environments
  418. UnixPath       support for Unix search path lists.
  419.  
  420.                      Table 3:  The SML/NJ Library
  421.  
  422.                                   6
  423.  
  424.  
  425.  
  426.  
  427. Memory usage
  428.  
  429. The compiler is now fully ``safe for space'' in the sense described in
  430. Chapter 12 of Compiling with Continuations.  Thus, it is now possible,
  431. in principle, to predict memory usage patterns just by reading the
  432. source code.
  433.  
  434. Internal changes
  435.  
  436. There have been many internal changes since release 0.75.  Summaries
  437. of these may be found in doc/bugs/NEWS and doc/bugs/LOGSUMMARY.
  438.  
  439.  
  440. CML and eXene
  441.  
  442. The Concurrent ML system, allowing multithreaded concurrent
  443. programming in an extension of Standard ML with synchronous
  444. communication channels, is available in a new release compatible with
  445. SML/NJ version 0.93.
  446.  
  447. eXene, an elegant concurrent interface to the X Window System, is also
  448. available.  The eXene system is built on top of Concurrent ML.
  449. CML and eXene are available for anonymous ftp on the same servers as
  450. SML/NJ. Fetch the files CML-0.9.8.tar.Z and eXene-0.4.tar.Z.
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470.  
  471.  
  472.  
  473.  
  474.  
  475.  
  476.                                    7
  477.  
  478.  
  479.  
  480.  
  481. 3  Installation
  482. 3.1  Getting this release
  483. The primary means of distributing the compiler is via anonymous ftp
  484. from hosts princeton.edu and research.att.com.  For those who do not
  485. have internet access directly or indirectory, distribution by tape is
  486. possible as a last resort.  The connect info and distribution
  487. directory is given by the following table:
  488.  
  489.               _Host______________Net_Address___Directory__
  490.                princeton.edu     128.112.128.1 /pub/ml
  491.  
  492.                research.att.com  192.20.225.2  /dist/ml
  493. To obtain the compiler by internet ftp, connect to one of the two
  494. hosts, use the login id ``anonymous'' with your email address as
  495. password, and go to the distribution directory.  There you will find
  496. the following files:
  497.  
  498.  README                Summary of release information
  499.  
  500.  93.release-notes.ps   The postscript for this document
  501.  93.release-notes.txt  This document in ascii form
  502.  93.src.tar.Z          The src directory containing source code
  503.  93.doc.tar.Z          The doc directory containing documentation
  504.  93.tools.tar.Z        The tools directory containing various tools
  505.  
  506.  smlnj-lib.0.1.tar.Z   The Standard ML of New Jersey Library
  507.  93.contrib.tar.Z      unsupported contributed software
  508.  93.mo.m68.tar.Z       The MC680x0 object files
  509.  93.mo.sparc.tar.Z     The SPARC object files
  510.  93.mo.mipsl.tar.Z     MIPS little-endian object files (for DEC machines)
  511.  
  512.  93.mo.mipsb.tar.Z     MIPS big-endian (for MIPS, SGI and Sony machines)
  513.  93.mo.hppa.tar.Z      HP Precision Architecture object files
  514.  93.mo.i386.tar.Z      Intel i386 object files
  515.  93.mo.rs6000.tar.Z    IBM RiscSystem 6000 (PowerSystem) object files
  516.  
  517.  93.mac.tar.Z          MacOS files
  518.  CML-0.9.8.tar.Z       Concurrent ML
  519.  eXene-0.4.tar.Z       eXene - an interface to X11
  520. You will need to transfer the files 93.src.tar.Z and 93.mo.arch.tar.Z
  521. in order to build a version for the architecture arch.  You will
  522. probably also want to retrieve the documentation, tools and library
  523. files.  Here is a sample ftp dialog:
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.                                    8
  531.  
  532.  
  533.  
  534.  
  535.    % ftp princeton.edu
  536.    Name: anonymous
  537.    Password: login@machine
  538.    ftp> binary
  539.    ftp> cd pub/ml
  540.    ftp> get README
  541.    ftp> get 93.src.tar.Z
  542.    ftp> get 93.tools.tar.Z
  543.    ftp> get smlnj-lib.0.1.tar.Z
  544.    ftp> get 93.doc.tar.Z
  545.    ftp> get 93.mo.m68.tar.Z
  546.    ftp> get 93.mo.rs6000.tar.Z
  547.    ftp> close
  548.    ftp> quit
  549.  
  550. NOTE: ftp must be put into binary mode before transferring the files.
  551.  
  552. After the files are transferred they should be uncompressed and
  553. unbundled (you will probably want to do this in a new directory).  For
  554. example:
  555.  
  556.    zcat 93.src.tar.Z _ tar -xf -
  557.  
  558. unpacks the src directory tree, which occupies about 2.5 megabytes of
  559. disk space.  The minimum required src tree can be extracted using the
  560. following command:
  561.  
  562.    zcat 93.src.tar.Z _ tar -xf - src/boot src/runtime src/makeml
  563.  
  564.  
  565. 3.2  Structure of the release
  566.  
  567. Each file 93.file.tar.Z in the distribution produces a directory tree
  568. with the root directory named file.  The mo.arch directories contain
  569. the precompiled ML object files for building the system for the
  570. architecture arch.
  571. The src directory tree contains the source code of the compiler and
  572. run-time system, as well as the makeml script, which is used for
  573. building the system (see Section 3.3).
  574.  
  575. The tools directory contains several software tools for SML, which are
  576. also written in SML. At the moment, this consists of the following:
  577.  
  578. tools/info rudimentary tool for querying the sml environment.
  579. tools/lexgen lexical analizer generator.
  580.  
  581. tools/mlyacc LALR(1) parser generator.
  582.  
  583.  
  584.                                    9
  585.  
  586.  
  587.  
  588.  
  589. tools/mltwig code generator generator based on dynamic tree pattern
  590.     matching.
  591. tools/sourcegroup system for supporting incremental recompilation of
  592.     SML programs.
  593.  
  594. tools/debug time travel based debugger.
  595. tools/prof display profile data - similar to UNIX prof.
  596.  
  597.  
  598. The smlnj-lib-0.1 directory contains the Standard ML of New Jersey
  599. Library; see smlnj-lib-0.1/README, and also Table 3 of this document.
  600. The library contains source code for several ML structures and
  601. functions that may be loaded into the system, and their documentation.
  602. The doc directory contains various pieces of documentation in
  603. subdirectories:
  604.  
  605. doc/batch description of the batch compiler.
  606.  
  607. doc/bugs contains the form for reporting bugs and a history of bug
  608.     reports and fixes.
  609. doc/man contains some UNIX manual pages.
  610.  
  611. doc/manual contains the parts of the Standard ML of New Jersey
  612.     Reference Manual.
  613.  
  614. doc/release-notes contains this document
  615. doc/papers contains copies of several papers and technical reports
  616.     relating to SML/NJ.
  617.  
  618. doc/examples contains a number of small example programs.
  619.  
  620. Documentation for the tools and libraries can be found in those
  621. directories.
  622.  
  623. 3.3  Installing the system
  624.  
  625. The compiler can be configured to generate native code for the
  626. following processors:  MIPS (little and big endian), Motorola 68000,
  627. SPARC, HP Precision, IBM PowerSystem, Intel 386/486 (alas, only with
  628. Unix).  The runtime system can also be configured for a variety of
  629. Unix-like operating systems including SunOS, 4.3BSD, MACH, ULTRIX,
  630. RISC/os, MORE, HPUX, AIX, and AUX.
  631.  
  632.  
  633. 3.3.1  Makeml
  634.  
  635. The file src/makeml is a tool for building the system from source and
  636. ML-object (`.mo') files.  At the very least, the arguments to makeml
  637.  
  638.                                    10
  639.  
  640.  
  641.  
  642.  
  643. must specify the hardware architecture and operating system.  For
  644. example:
  645.  
  646.    makeml -mips riscos
  647.  
  648. when executed in the src directory, would build the interactive
  649. compiler for a MIPS processor running RISC/os.  Makeml assumes that
  650. the mo files are in a directory that is at the same level as the src
  651. directory.
  652. The compiler for the HP Precision Architecture is in beta-release, but
  653. is likely to be adequate for classroom use.
  654.  
  655. Table 4 gives some useful computer/opsys combinations for arguments to
  656. makeml.  More detailed options can be found in the makeml manpage
  657. (also included in the appendix).
  658. Note,
  659.  
  660. VAX: While the VAX code generator has been maintained internally, due
  661.     to the lack of access to a machine, we have been unable to build
  662.     or test it.  If anyone is interested in getting this to run, we
  663.     would be glad to provide assistance and answer questions.  Note:
  664.     If there is not much interest in this, it is very likely that the
  665.     VAX code generator will be dropped in future releases.
  666.  
  667. MIPS R4000: There is a bug in the MIPS R4000 processor - namely a
  668.     branch at the end of a page causes the system to crash.  At
  669.     present we cannot guarantee against this condition, though the
  670.     next release should address this problem.  Unfortunately, this
  671.     condition occurs quite frequently.
  672. HPPA: The Hewlett Packard HPPA port is in a beta release mode, but
  673.     should be adequate for classroom use.  We would appreciate any
  674.     help in finding small examples that expose bugs in this
  675.     implementation.  The default mode on this machine is -noshare.  It
  676.     is impossible to build SML/NJ in share or -pervshare mode on this
  677.     machine (see Section 3.3.3).
  678.  
  679.  
  680. 3.3.2  Machintosh OS
  681.  
  682. This section describes how to build SML/NJ on the Apple Machintosh.
  683.  
  684. You must be running MacOS System 7, use 32 bit addressing, and have at
  685. least 16Mbytes of memory in your Mac to build SML/NJ. The Mac must
  686. also have an FPU and the processor must be a M68020, M68030, or
  687. M68040.
  688. You should have the SML/NJ distribution with:
  689.   o all the files from 93.src.tar.Z installed in directory src:  ;
  690.  
  691.  
  692.                                    11
  693.  
  694.  
  695.  
  696.  
  697.     _______________________________________________________________
  698.     |_Processor_Vendor__|Options____________|Comments______________|
  699.     | Vax       DEC     |-vax bsd           |(bsd includes Ultrix) |
  700.     |___________________|-vax_mach__________|______________________|
  701.     | 680x0     Sun     |-m68 sunos         |                      |
  702.     |                   |-m68 mach          |                      |
  703.     | 680x0     HP      |-m68 hpux          |                      |
  704.     |                   |-m68 hpux8         |HPUX 8.0 or newer     |
  705.     |                   |-m68 more          |                      |
  706.  
  707.     | 680x0     Apple   |-m68 aux           |AUX 3.0               |
  708.     |                   |see Section 3.3.2  |MacOS 7.0             |
  709.     | 680x0     NeXT    |-next 2.0          |NeXTStep 2.0          |
  710.     |___________________|-next_3.0__________|NeXTStep_3.0__________|
  711.     |_RS_6000___IBM_____|-rs6000_aix________|AIX_3.2_or_newer______|
  712.     | MIPS      DEC     |-decstation ultrix |little-endian R3000   |
  713.     |                   |-decstation mach   |little-endian R3000   |
  714.     | MIPS      MIPS    |-mips riscos       |                      |
  715.  
  716.     |                   |-mips mach         |                      |
  717.     | MIPS      SGI     |-sgi irix          |IRIX 4.x              |
  718.     |                   |-sgi irix3         |old IRIX (3.x)        |
  719.     |_MIPS______Sony____|-mips_news_________|______________________|
  720.     | SPARC     Sun     |-sun4 sunos        |                      |
  721.     |___________________|-sun4_mach_________|______________________|
  722.     |_HPPA______HP______|-hppa_hpux8________|beta_release__________|
  723.  
  724.     | 386/486   Intel   |-i386 mach         |                      |
  725.     |                   |-i386 bsd          |BSD386                |
  726.     |_386_______Sequent_|-sequent_dynix3____|______________________|
  727.  
  728.  
  729.          Table 4:  Makeml machine and operating system options
  730.  
  731.   o 93.mo.m68.tar.Z files should be located in the directory src:mo:
  732. There are some Mac specific files in the src:  and src:runtime:
  733. directories; all of the files in the src:runtime:mac:  directory are
  734. Mac specific.
  735.  
  736. The Mac specific files in src:  are:
  737.  
  738.   o src:SMLeNJ.p
  739.  
  740.   o src:SMLeNJ.p.rsrc
  741.  
  742.  
  743. Then to build SML/NJ for the Mac:
  744.  
  745.  
  746.                                    12
  747.  
  748.  
  749.  
  750.  
  751.  1. launch ThinkC (5.0.4 or later) with the SMLeNJ.p project.  Choose
  752.     Build Application from the Project menu.  Save the application in
  753.     the src:  directory with an appropriate name.  Quit ThinkC.
  754.  
  755.  2. Verify that the application's preferred size is at least 12M
  756.     bytes, and that at least 12M bytes are free in the Mac.  (You can
  757.     find the application's preferred size using Get Info in the File
  758.     menu of the Finder.  You can determine how much memory is
  759.     available using About This Macintosh.  in the Apple menu.)
  760.  
  761.  3. Launch the newly built application; you will be presented with a
  762.     dialog box expecting a command line, type:  "-r 3 IntM68" and
  763.     <return>.  The mo files will be loaded.
  764.  
  765.  4. You may now save the SML image as a separate file to be imported
  766.     later, or you may save it into the newly built application.  To
  767.     save it into the application, in this example named SMLeNJ93,
  768.     type:
  769.  
  770.        if exportML("SMLeNJ93") then print(``Whoopee!"n'')
  771.        else print(``"n'');
  772.  
  773.     To save the image into its own file, use a different filename.
  774.  
  775. If you have already built a Mac image into a separate file, step 3
  776. above may be replaced by:
  777.  
  778.   o Launch the newly built application; you will be presented with a
  779.     dialog box expecting a command line, type:  "-i < filename >" and
  780.     < return >.  The image file will be loaded.
  781.  
  782.  
  783. Relaunching the newly built application will automatically load the
  784. image exported into the application.
  785. You may also force such an application to accept a command line by
  786. holding down the <option> key while the application is being launched.
  787. At this point you may continue with step 3 above.
  788.  
  789.  
  790. Developers:  It is also possible to run with the ThinkC Debugger.  In
  791. step 1 above, select Use Debugger, and use Run instead of Build
  792. Application.  You will be presented with a command line dialog box.
  793. Proceed as above (step 3) or use the other command line options.
  794. For further documentation on the machintosh see the directory mac.
  795.  
  796.  
  797.  
  798.  
  799.  
  800.                                    13
  801.  
  802.  
  803.  
  804.  
  805. 3.3.3  Sharable Text Segment
  806.  
  807. By default, sml is built with a sharable, read-only text segment
  808. containing the runtime system (compiled from C code) and the compiler
  809. (compiled from ML code).  However, to allow exportFn to create
  810. executable files not containing the compiler, it is necessary to make
  811. a special version of sml that contains the compiler in the data
  812. segment.  This can be done with the makeml options
  813. -noshare -o sml-noshare
  814. where the -o option affects only the naming of the newly-built
  815. executable.  In addition, using -pervshare it is possible to build an
  816. SML executable with just the base environment loaded into the text
  817. segment.
  818.  
  819.  
  820. 3.3.4  Managing Memory Use
  821.  
  822. ML provides automatic storage management through a garbage-collected
  823. heap.  Since the heap is used intensively, choice of heap size can
  824. have a significant impact on performance.  The compiler determines an
  825. efficient heap size automatically on startup, resizes the heap up or
  826. down as the amount of live data changes, and complains if it runs out
  827. of memory (the interactive system can be booted in approximately 8
  828. megabytes).
  829.  
  830. The -m k option to makeml sets the target heap size (``softmax'') to k
  831. kilobytes.  The default is 12288k (12 Mbytes).  On a 16-megabyte
  832. machine, -m 8192 might be appropriate; on a 32-megabyte single-user
  833. workstation, -m 20000 might do.  In general, set it to the amount of
  834. physical memory you think should be available to the ML program.
  835. The softmax is very loose; SML will tend to be generous with memory
  836. for programs until they hit the softmax; after that it will be more
  837. parsimonious.  The point is that the larger the heap size, the smaller
  838. the garbage collection time overhead.  But large-memory programs can
  839. still use much more than the softmax (indeed, they may use as much as
  840. the operating system is willing to give them).
  841.  
  842. The softmax can also be set dynamically at runtime by assigning to the
  843. variable System.Control.Runtime.softmax (which is counted in bytes,
  844. not kilobytes).
  845.  
  846. 3.3.5  Batch Compiler
  847.  
  848. The SML/NJ batch compiler provides some (unsafe) cross compilation and
  849. bootstrapping capabilities.  The Batch Compiler manual,
  850. doc/batchcomp.ps, describes these; but they are not recommended for
  851.  
  852.  
  853.  
  854.                                    14
  855.  
  856.  
  857.  
  858.  
  859. casual users.  Furthermore, this batch compiler will become obsolete
  860. immediately:  it will not be used in any version after 0.93.
  861.  
  862. 3.3.6  Other options
  863.  
  864. Options also exist for building a batch compiler, a version of the
  865. compiler with the debugger loaded, cross compilers, etc.  The manpage
  866. for makeml should be consulted for further details of options that are
  867. available.
  868.  
  869. If you have trouble installing the system, please send us a request
  870. for help, including the version of the compiler (check the definition
  871. of the version variable in src/boot/perv.sml if in doubt), hardware
  872. configuration (machine type and memory size), operating system, and an
  873. input/output script showing the problem.  Use the file
  874. doc/bugs/bug.form as a format for your message.
  875. The following pages contain a man page for the makeml command.
  876.  
  877.  
  878.  
  879.  
  880.  
  881.  
  882.  
  883.  
  884.  
  885.  
  886.  
  887.  
  888.  
  889.  
  890.  
  891.  
  892.  
  893.  
  894.  
  895.  
  896.  
  897.  
  898.  
  899.  
  900.  
  901.  
  902.  
  903.  
  904.  
  905.  
  906.  
  907.  
  908.                                    15
  909.  
  910. MAKEML(TOOL)MAKEML(TOOL)                                   MAKEML(TOOL)MAKEML(TOOL)
  911.  
  912.  
  913. NAME
  914.       makeml --- build the Standard ML of New Jersey system
  915.  
  916.  
  917. SYNOPSIS
  918.       makeml options
  919.  
  920.  
  921. DESCRIPTION
  922.       Makeml is a tool for building the Standard ML of New Jersey
  923.       system (SML/NJ) from source and ML-object (`.mo') files.
  924.       SML/NJruns on a number of machine architectures (MC680x0, Mips,
  925.       SPARC, RS/6000, HPPA, and i386/i486) and under a number of
  926.       different operating systems (SunOS, 4.3bsd, Mach, IRIX, Ultrix,
  927.       AIX, ...).  There are also several different configurations of
  928.       the system that can be built.  Makeml provides a reasonable
  929.       interface to these various options.
  930.  
  931.  
  932. OPTIONS
  933.       The following options are used to specify the machine and
  934.       operating system configuration.  These are the only ones
  935.       necessary for the basic installation.
  936.  
  937.  
  938.  
  939.       -sun3 (sunos | mach)
  940.             Build the system for the Sun 3.
  941.       -sun4 (sunos | mach)
  942.             Build the system for sparc machines, including the
  943.             Sparcstation 10.
  944.  
  945.       (-rs6000 | -rs6k) aix
  946.             Build the version for the IBM RS/6000 workstations.  Note:
  947.             this requires AIX version 3.2.
  948.  
  949.       -decstation (bsd | ultrix | mach)
  950.             Build the version for the DEC mips processor boxes.  These
  951.             are little-endian machines.
  952.       -mips (riscos | mach)
  953.             Build the version for the MipsCo machines (R3000, R6280).
  954.             This is a big-endian machine.
  955.  
  956.       -sgi (irix | irix3)
  957.             Build the version for the Silicon Graphics machines; the
  958.             irix3 option specifies Irix 3.x, otherwise Irix 4.x is
  959.             assumed.  These are big-endian mips processors.
  960.  
  961.  
  962.                     Last change:  February 15, 1993                  16
  963.  
  964. MAKEML(TOOL)                                               MAKEML(TOOL)
  965.  
  966.  
  967.       -hppa hpux8
  968.             Build the hppa version running under HPUX 8.0 (earlier
  969.             versions of HPUX have not been tested).  By default makeml
  970.             builds a noshare version (see -noshare option), and the
  971.             -pervshare option is ignored.
  972.       -m68 (aux | sunos | mach | hpux | hpux8 | more)
  973.             Build a version for a M680x0 family machine.  The hpux8
  974.             option is for version 8.0 of the HPUX operating system;
  975.             use hpux for earlier versions.
  976.  
  977.       -next(2 | 3)
  978.             Build the version for the NeXT machine (either NeXTstep
  979.             2.x or NeXTstep 3.x).  The NeXT machine uses a
  980.             non-standard version of MACH as its operating system,
  981.             which isn't BSD compatible.
  982.  
  983.       -i386 (mach | bsd | bsd386)
  984.             Build the system for i386/i486 machines.  The bsd386
  985.             version has patches to fix problems with signals in
  986.             BSD/386.
  987.       -sequent dynix3
  988.             Build the system for the Sequent (i386).
  989.  
  990.       -vax (bsd | mach)
  991.             Build the vax version.  This version is ``out of service''
  992.             for version 0.93 of SML/NJ. Use version 0.75 on the vax.
  993.  
  994.  
  995.       The following options are used to specify the kind of system to
  996.       build.
  997.  
  998.  
  999.       -debug Build an image (with default name `smld') with the
  1000.             debugger loaded.
  1001.  
  1002.       -i    Make the `sml' image start out using the interpreter for
  1003.             faster compilation and slower execution (for interactive
  1004.             system only; can switch back to native code once in `sml'
  1005.             by `System.Control.interp := false').
  1006.  
  1007.       -ionly Build an image (with default name `smli') that has only
  1008.             the interpreter.  This gives fast compilation and saves
  1009.             space by eliminating the code generator from the
  1010.             executable, but results in slower execution.
  1011.       -batch Build the batch compiler (with default name `smlc')
  1012.             instead of an interactive system.
  1013.  
  1014.  
  1015.  
  1016.                     Last change:  February 15, 1993                  17
  1017.  
  1018. MAKEML(TOOL)                                               MAKEML(TOOL)
  1019.  
  1020.  
  1021.       -target machine
  1022.             Build a batch cross compiler for machine.  Valid machine
  1023.             names are:  m68, sparc, mipsl, mipsb, vax, and i386.  Note
  1024.             that for the Mips architecture you must specify the
  1025.             endianess.  This option implies the -batch option.
  1026.       -o imag
  1027.             Use image as the name of the system image.  The default
  1028.             image name is `sml' for interactive systems, `smld' for
  1029.             the debugger version, `smli' for the interpreter only
  1030.             system and `smlc' for the batch compiler.
  1031.  
  1032.       -noshare
  1033.             Do not link the `.mo' files into an `a.out' format object
  1034.             file and include it in the runtime executable.
  1035.  
  1036.       -pervshare
  1037.             Link only a minimal set of `.mo' files into the object.
  1038.             This is not applicable to the HPPA.
  1039.       -gcc  Use the GNU C compiler to compile the run-time system.
  1040.             This will improve the garbage collector performance on
  1041.             some machines (e.g., Sun3).  Note:  this only works with
  1042.             GCC 1.xx.
  1043.  
  1044.  
  1045.       The following options may be used to tune garbage collection and
  1046.       paging performance.
  1047.  
  1048.  
  1049.  
  1050.       -h heapsize
  1051.             Set the initial heap size to heapsize kilo-bytes.
  1052.       -m softlimit
  1053.             Set the soft limit on the heap size to softlimit
  1054.             kilo-bytes.
  1055.  
  1056.       -r ratio Set the ratio of the heap size to live data to ratio,
  1057.             which must be an integer value no less than 3.
  1058.             The following options are for building and testing new
  1059.             versions of the system; they are not necessary for normal
  1060.             installation.
  1061.  
  1062.       -run  Build the run-time kernel (`runtime/run'), but don't build
  1063.             a system.
  1064.  
  1065.       -noclean
  1066.             Don't remove the existing `.o' files in the runtime
  1067.             directory.
  1068.  
  1069.  
  1070.                     Last change:  February 15, 1993                  18
  1071.  
  1072. MAKEML(TOOL)                                               MAKEML(TOOL)
  1073.  
  1074.  
  1075.       -norun
  1076.             Don't re-compile the runtime kernel.  This implies the
  1077.             -noclean option.
  1078.       -mo path
  1079.             Use path as the directory containing the `.mo' files.
  1080.  
  1081.       -runtime path
  1082.             Use path] as the source directory for the runtime code.
  1083.  
  1084.       -g    Compile the runtime with the -g command line option.
  1085.       -D def When compiling the runtime code add ``-D def'' as a
  1086.             command line option.
  1087.  
  1088.       -debug0
  1089.             Build a version with the debugger internals, but not the
  1090.             user-level code.
  1091.  
  1092.  
  1093. USAGE
  1094.       For the standard configuration, the only options required are
  1095.       the machine type and operating system.  For example
  1096.          makeml -sun4 sunos
  1097.  
  1098.       builds the SPARC version of the interactive system to run on
  1099.       SunOS systems.  Another example is
  1100.             makeml -sun4 sunos -target mipsl
  1101.  
  1102.       which builds a sparc to mipsl cross compiler.
  1103.  
  1104.  
  1105. ENVIRONMENT
  1106.  
  1107. GCC
  1108.       Specifies the path of gcc.  Set this if your path doesn't
  1109.       contain gcc and you are using the `-gcc' option.
  1110.  
  1111.  
  1112. FILES src/makeml              the makeml shell script.
  1113.  
  1114.  
  1115.  
  1116. SEE ALSO
  1117.       makeml(1), linkdata(1), sml(1)
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124.                     Last change:  February 15, 1993                  19
  1125.